Optimal. Leaf size=111 \[ \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{c^{3/2} f}-\frac {2 a d \tan (e+f x)}{c (c+d) f \sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {4024, 4019,
209, 4072, 37} \begin {gather*} \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a} \sqrt {c+d \sec (e+f x)}}\right )}{c^{3/2} f}-\frac {2 a d \tan (e+f x)}{c f (c+d) \sqrt {a \sec (e+f x)+a} \sqrt {c+d \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 209
Rule 4019
Rule 4024
Rule 4072
Rubi steps
\begin {align*} \int \frac {\sqrt {a+a \sec (e+f x)}}{(c+d \sec (e+f x))^{3/2}} \, dx &=\frac {\int \frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {c+d \sec (e+f x)}} \, dx}{c}-\frac {d \int \frac {\sec (e+f x) \sqrt {a+a \sec (e+f x)}}{(c+d \sec (e+f x))^{3/2}} \, dx}{c}\\ &=-\frac {(2 a) \text {Subst}\left (\int \frac {1}{1+a c x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{c f}+\frac {\left (a^2 d \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} (c+d x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{c f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{c^{3/2} f}-\frac {2 a d \tan (e+f x)}{c (c+d) f \sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.98, size = 135, normalized size = 1.22 \begin {gather*} -\frac {\sec \left (\frac {1}{2} (e+f x)\right ) \sqrt {a (1+\sec (e+f x))} \left (-\sqrt {2} (c+d)^{3/2} \text {ArcSin}\left (\frac {\sqrt {2} \sqrt {c} \sin \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right ) \sqrt {\frac {d+c \cos (e+f x)}{c+d}}+2 \sqrt {c} d \sin \left (\frac {1}{2} (e+f x)\right )\right )}{c^{3/2} (c+d) f \sqrt {c+d \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(376\) vs.
\(2(95)=190\).
time = 1.98, size = 377, normalized size = 3.40
method | result | size |
default | \(-\frac {\left (\sqrt {2}\, \sqrt {-\left (c -d \right )^{4} c}\, \arctan \left (\frac {\left (-1+\cos \left (f x +e \right )\right ) \left (c -d \right )^{2} c \sqrt {2}}{\sqrt {-\frac {2 \left (d +c \cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {-\left (c -d \right )^{4} c}}\right ) \sqrt {-\frac {2 \left (d +c \cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )+1}}\, c \sin \left (f x +e \right )+\sqrt {2}\, \sqrt {-\left (c -d \right )^{4} c}\, \arctan \left (\frac {\left (-1+\cos \left (f x +e \right )\right ) \left (c -d \right )^{2} c \sqrt {2}}{\sqrt {-\frac {2 \left (d +c \cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right ) \sqrt {-\left (c -d \right )^{4} c}}\right ) \sqrt {-\frac {2 \left (d +c \cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )+1}}\, d \sin \left (f x +e \right )-2 c^{3} d \cos \left (f x +e \right )+4 c^{2} d^{2} \cos \left (f x +e \right )-2 \cos \left (f x +e \right ) c \,d^{3}+2 c^{3} d -4 c^{2} d^{2}+2 c \,d^{3}\right ) \cos \left (f x +e \right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \sqrt {\frac {d +c \cos \left (f x +e \right )}{\cos \left (f x +e \right )}}}{f \left (d +c \cos \left (f x +e \right )\right ) \sin \left (f x +e \right ) \left (c +d \right ) c^{2} \left (c^{2}-2 c d +d^{2}\right )}\) | \(377\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 250 vs.
\(2 (101) = 202\).
time = 3.03, size = 552, normalized size = 4.97 \begin {gather*} \left [-\frac {2 \, d \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left ({\left (c^{2} + c d\right )} \cos \left (f x + e\right )^{2} + c d + d^{2} + {\left (c^{2} + 2 \, c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {a}{c}} \log \left (-\frac {2 \, c \sqrt {-\frac {a}{c}} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a c \cos \left (f x + e\right )^{2} + a c - a d - {\left (a c + a d\right )} \cos \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{{\left (c^{3} + c^{2} d\right )} f \cos \left (f x + e\right )^{2} + {\left (c^{3} + 2 \, c^{2} d + c d^{2}\right )} f \cos \left (f x + e\right ) + {\left (c^{2} d + c d^{2}\right )} f}, -\frac {2 \, {\left (d \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left ({\left (c^{2} + c d\right )} \cos \left (f x + e\right )^{2} + c d + d^{2} + {\left (c^{2} + 2 \, c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {a}{c}} \arctan \left (\frac {\sqrt {\frac {a}{c}} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{a \sin \left (f x + e\right )}\right )\right )}}{{\left (c^{3} + c^{2} d\right )} f \cos \left (f x + e\right )^{2} + {\left (c^{3} + 2 \, c^{2} d + c d^{2}\right )} f \cos \left (f x + e\right ) + {\left (c^{2} d + c d^{2}\right )} f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )}}{\left (c + d \sec {\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}}{{\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________